type go/types.Const
24 uses
go/types (current package)
assignments.go#L121: func (check *Checker) initConst(lhs *Const, x *operand) {
call.go#L739: case *Const:
decl.go#L127: case *Const:
decl.go#L182: case *Const:
decl.go#L224: case *Const, *Var:
decl.go#L432: func (check *Checker) constDecl(obj *Const, typ, init ast.Expr, inherited bool) {
decl.go#L882: lhs := make([]*Const, len(d.spec.Names))
initorder.go#L327: _, xConst := x.obj.(*Const)
initorder.go#L328: _, yConst := y.obj.(*Const)
object.go#L261: type Const struct {
object.go#L268: func NewConst(pos token.Pos, pkg *Package, name string, typ Type, val constant.Value) *Const {
object.go#L269: return &Const{object{nil, pos, pkg, name, typ, 0, colorFor(typ), nopos}, val}
object.go#L273: func (obj *Const) Val() constant.Value { return obj.val }
object.go#L275: func (*Const) isDependency() {} // a constant may be a dependency of an initialization expression
object.go#L520: case *Const:
object.go#L636: func (obj *Const) String() string { return ObjectString(obj, nil) }
typexpr.go#L93: case *Const:
typexpr.go#L519: if _, ok := obj.(*Const); !ok {
golang.org/x/exp/apidiff
apidiff.go#L122: case *types.Const:
apidiff.go#L123: if new, ok := new.(*types.Const); ok {
apidiff.go#L157: func (d *differ) constChanges(old, new *types.Const) {
apidiff.go#L174: case *types.Const:
golang.org/x/tools/go/types/objectpath
objectpath.go#L236: case *types.Const, // Only package-level constants have a path.
golang.org/x/tools/internal/gcimporter
iexport.go#L747: case *types.Const: